home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / basic / qlib54.zip / INPUT.DOC < prev    next >
Text File  |  1992-04-22  |  21KB  |  508 lines

  1.  
  2.   INPUT subroutines replace BASIC's INKEY$ or INPUT commands, and add
  3.   functions not available with BASIC alone.
  4.  
  5.  
  6.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  7.  
  8.     Subroutine: ClearKey
  9.     object file: clearkey.obj (getkey.obj)
  10.  
  11.         Removes all keypresses from the keyboard's "type ahead" buffer.
  12.     Works with standard and enhanced keyboards.
  13.  
  14.     Example:
  15.         CALL ClearKey
  16.  
  17.  
  18.  
  19.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  20.  
  21.     Function: keycode% = DGetKey
  22.     object file: dgetkey.obj
  23.  
  24.          Using DOS functions, DGetKey returns the ASCII character code of
  25.     the first keypress waiting in the keyboard buffer.  If the key code
  26.     returned > 255, then the key pressed is an extended keycode (such as
  27.     the function keys F1 - F10) and the ASCII code of the key is (code%
  28.     AND 255).  If no keypresses are waiting in the keyboard buffer,
  29.     DGetKey waits until a key is pressed before it returns to BASIC.
  30.     Unlike GetKey, below, input to DGeyKey may be redirected from the
  31.     command line.  DGeyKey does not support F11 or F12 function keys.
  32.     DGetKey allows ^C to pass through as keycode% = 3 without causing your
  33.     program to stop.  ^<Break> works the same as ^C in compiled programs;
  34.     in the QuickBASIC or QBX development enviornment, ^<break> causes
  35.     suspension of program operation (as it normally does).  See your BASIC
  36.     manual for ASCII character codes.
  37.  
  38.     Example:
  39.         REM $INCLUDE: 'qlib.bi'
  40.         keycode% = DGetKey
  41.         IF keycode% < 255 THEN PRINT CHR$(keycode%)   ' prints key pressed
  42.  
  43.  
  44.  
  45.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  46.  
  47.     Function: GPullDown(VARPTR(menu$(0)), choice0%, choice1%)
  48.     object files: gpulldn.obj (q$menu.obj and several others)
  49.               (for graphics modes)
  50.  
  51.     Function: PullDown(VARPTR(menu$(0)), choice0%, choice1%)
  52.     object files: pulldown.obj (q$menu.obj and several others)
  53.               (for text modes)
  54.  
  55.     Subroutine: MenuOption(optionnumber%, option% [option$ for option 6])
  56.     object file: q$menu.obj
  57.  
  58.     Requires QuickBASIC or BC7 without /fs switch
  59.     NOT for QBX development enviornment
  60.  
  61.     Pull-down menu system similar to the menus in the QuickBASIC
  62.     development environment.  You may specify initial main choice and
  63.     initial submenu choice (choice0% and choice1%).  PullDown returns to
  64.     BASIC when either ESC or RETURN is pressed, and returns the menu choice
  65.     in choice0% and choice1%.  Use cursor keys, home/end, pgup/pgdown or
  66.     mouse to move cursor.  PullDown will also jump to a menu choice when an
  67.     alphabetic key is pressed if that menu choice includes a capitalized
  68.     letter, and the key pressed matches the capital letter ("Hotkey"
  69.     feature).  Menu choices are disabled if all lower case.
  70.  
  71.     PullDown saves the screen under the menu, and restores the
  72.     previous screen when it exits.
  73.  
  74.     If choice1% (initial submenu choice) < 0, the main selections
  75.     will be printed without submenus.  You may move among the main
  76.     headings with left & right arrow keys or with the mouse.  Submenus
  77.     are displayed when Enter or any mouse buttons are pressed, or when
  78.     up or down arrows are pressed, or when the mouse pointer is moved up
  79.     or down.  Esc will erase the main headings and return to BASIC.
  80.  
  81.     MenuOption is used to specify colors.  Options supported are:
  82.  
  83.     option 0 = normal text color
  84.     option 1 = highlight color (menu choice)
  85.     option 2 = menu box color
  86.     option 3 = hotkey color
  87.  
  88.     If you do not specify colors, PullDown uses bright white text and
  89.     menu box, reverse video menu choice and hotkey color.
  90.  
  91.     Other options are:
  92.  
  93.     option 4 = user-specified exit key code (see GetKey for keycodes)
  94.     option 5 = exit when hotkey is pressed
  95.     option 6 = user-specified string printed at right edge of screen
  96.  
  97.     Any menu option may be canceled by setting the option = 0.
  98.  
  99.     Example:
  100.        see MENU.BAS example program
  101.  
  102.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  103.  
  104.     Function: keycode% = GetKey
  105.     object file: getkey.obj (asmflags.obj)
  106.  
  107.         Returns the ASCII character code of the first keypress waiting in
  108.     the keyboard buffer.  If the key code returned > 255, then the key
  109.     pressed is an extended keycode (such as the function keys F1 - F10)
  110.     and the ASCII code of the key is (code% AND 255).  If no keypresses are
  111.     waiting in the keyboard buffer, GetKey waits until a key is pressed
  112.     before it returns to BASIC.  GetKey supports F11 and F12 on 101-key
  113.     keyboards if the PC's BIOS also supports 101-key keyboards (See GetKBD).
  114.     See your BASIC manual for most ASCII character codes.
  115.  
  116.     ASCII character codes for F11 and F12 are not listed in some BASIC
  117.     manuals:
  118.                    with SHIFT     with CTRL      with ALT
  119.     F11       133       135            137            139
  120.     F12       134       136            138            140
  121.  
  122.     Example:
  123.          REM $INCLUDE: 'qlib.bi'
  124.          keycode% = GetKey
  125.          IF keycode% AND 256 THEN
  126.               keycode% = keycode% AND 255
  127.               IF keycode% = 138 THEN PRINT "CTRL+F12 was pressed"
  128.               ELSE
  129.            .
  130.            .
  131.            .
  132.          END IF
  133.  
  134.  
  135.  
  136.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  137.  
  138.     Subroutine: HideMouse
  139.     object file: mouse.obj
  140.  
  141.          Makes the mouse cursor disappear.  The mouse driver continues to
  142.     track the mouse's motion and button status.
  143.  
  144.     Example:
  145.          HideMouse
  146.  
  147.  
  148.  
  149.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  150.  
  151.     Function: k% = IsAlpha(keycode%)
  152.     object file: isalpha.obj
  153.  
  154.     Function: k% = IsDigit(keycode%)
  155.     Function: k% = IsLower(keycode%)
  156.     Function: k% = IsUpper(keycode%)
  157.     object file: isdlu.obj
  158.  
  159.          These function quickly determine if keycode% is an alphabetic
  160.     character (A-Z, a-z: IsAlpha), a numeric digit (0-9: IsDigit), a
  161.     lower-case alphabetic character (a-z: IsLower) or an upper-case
  162.     alphabetic character (A-Z: IsUpper).  k% = keycode% if keycode%
  163.     meets the function's search criteria, or k% = 0 if keycode is not
  164.     0-9, A-Z, or a-z (depending on the function).  Keycode% may be the
  165.     output of LineEdit, GLineEdit or the GetKey or DGetKey functions.
  166.  
  167.     Example:
  168.       REM $INCLUDE: 'qlib.bi'
  169.       REM I want to input only lowercase a-z
  170.  
  171. 10:   k% = IsLower(GetKey)
  172.       IF k% = 0 GOTO 10
  173.  
  174.  
  175.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  176.  
  177.     Function: k% = KeyFilter(s1$, s2$, keycode%)
  178.     object file: keyfilt.obj
  179.  
  180.         KeyFilter compares keycode% to each character in the strings
  181.     s1$ and s2$, and returns k% = 0 unless keycode% matches a character
  182.     in the search strings.  If keycode% is a normal character (i.e., not
  183.     a function key), then s1$ is used.  If keycode% is an extended keycode,
  184.     (keycode% > 255) then s2$ is used.  See example.
  185.  
  186.     Example:
  187.     REM $INCLUDE: 'qlib.bi'
  188.     REM  I want to input only the letters a, c and g (upper or lower case)
  189.     REM  and I also want to watch for F10 (keycode% = 256 OR 68)
  190.     s1$ = "aAcCgG"
  191.     s2$ = CHR$(68)
  192. 10: k% = KeyFilter(s1$, s2$, keycode%)
  193.     IF k% = 0 GOTO 10
  194.  
  195.     REM  Note that KeyFilter may also be called using one of QLIB's input
  196.     REM  functions such as GetKey, DGetKey or KeyIfWaiting like this:
  197.     REM  10: k% = KeyFilter(s1$, s2$, KeyIfWaiting)
  198.     REM      IF k% = 0 GOTO ...
  199.  
  200.  
  201.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  202.  
  203.     Function: keycode% = KeyIfWaiting
  204.     object files: kifwait.obj (getkey.obj, asmflags.obj)
  205.  
  206.     Uses BIOS calls to determine whether a key is waiting in the keyboard
  207.     buffer, returning the key to BASIC.  If no key is waiting, KeyIfWaiting
  208.     returns keycode% = 0.  KeyIfWaiting supports F11 and F12 keys on 101-key
  209.     keyboards if the PC's BIOS also supports these keyboards.
  210.  
  211.     Example:
  212.          keycode% = KeyIfWaiting
  213.  
  214.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  215.  
  216.     Subroutine: KeyOrButton(buttons%, keycode%)
  217.     object files: mouse.obj (getkey.obj)
  218.  
  219.     Returns first key pressed or mouse button pressed.  If no key is waiting
  220.     in the keyboard buffer and no mouse button is pressed, KeyOrButton waits
  221.     until one of these events happens.  If a key is waiting in the keyboard
  222.     buffer before KeyOrButton is called, the key is returned to QB without
  223.     checking mouse buttons.  Buttons% = 0 if a key has been read, otherwise
  224.     buttons% indicates which buttons are pressed.  See GetKey for key codes,
  225.     and see the example below for buttons% codes.  More than one button may
  226.     be pressed.
  227.  
  228.     Example:
  229.         CALL KeyOrButton(buttons%, keycode%)
  230.         msg$ = ""
  231.         IF buttons% THEN
  232.                IF buttons% AND 1 THEN msg$ = "left button pressed "
  233.                IF buttons% AND 2 THEN msg$ = msg$ + "right button pressed "
  234.                IF buttons% AND 4 THEN msg$ = msg$ + "center button pressed"
  235.                PRINT msg$
  236.                ELSE
  237.                            ' action for key pressed
  238.         END IF
  239.  
  240.  
  241.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  242.  
  243.     Function: a% = KeyWaiting
  244.     object file: getkey.obj (asmflags.obj)
  245.  
  246.     Uses BIOS calls to determine whether a key is waiting in the keyboard
  247.     buffer, without reading the key.  KeyWaiting supports F11 and F12 keys on
  248.     101-key keyboards if the PC's BIOS also supports these keyboards.
  249.  
  250.     Example:
  251.          REM $INCLUDE: 'qlib.bi'
  252.          IF KeyWaiting% THEN PRINT "A key has been pressed"
  253.  
  254.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  255.  
  256.     Subroutine: LineEdit(st$, row%, col%, attr%, options%, keycode%)
  257.     Subroutine: StartEdit(startcol%)
  258.     Function: LastEdit
  259.     object files: lineedit.obj (crt.obj, q$qprn.obj, cursor.obj, getkey.obj)
  260.  
  261.          LineEdit displays st$ at (row%, col%) and provides many editing
  262.     functions, returning the edited string to BASIC.  The length of st$
  263.     will not change during the editing process.  Options are provided to
  264.     restrict legal input or to provide additional information, depending on
  265.     the bits set in options%.  See LineEdit's Summary of Commands, below.
  266.     See GetKey to interpret the keycode% returned by LineEdit.
  267.          StartEdit may be used before calling LineEdit in order to begin or
  268.     resume editing at a specified position in st$ (default position is
  269.     1, the left end of the string).  LastEdit is used after LineEdit returns
  270.     to BASIC, to determine the cursor position in st$ when control was
  271.     returned to BASIC.
  272.          LineEdit turns the cursor off when returning to BASIC.  You may
  273.     use BASIC's LOCATE command or QLIB's CursorON subroutine to restore
  274.     the cursor.  LineEdit works only in text mode.  Use GLineEdit in graphics
  275.     modes (See GLineEdit in GRAPHICS.DOC.).  LineEdit will edit any string up
  276.     to 32,767 bytes long.  See also WindowEdit.
  277.  
  278.     Thanks to Thomas Cullins for his bug report on the BC7/QBX version of
  279.     LineEdit.
  280.  
  281.      Summary of LineEdit commands:
  282.  
  283.      Enter, Esc = return string to BASIC
  284.      Left arrow, Right arrow = move cursor
  285.      Insert = toggle insert/overstrike modes
  286.      Home = move cursor to start of line
  287.      End = move cursor to end of text
  288.      Delete = delete character at cursor and close up space
  289.      Backspace = move cursor back one space, delete character, and close space
  290.      Ctrl+End = clear from cursor to end of line
  291.      Ctrl+Left, Ctrl+Right = move cursor one word
  292.  
  293.      LineEdit options and examples are on the next page.
  294.  
  295.  
  296.      LineEdit options:
  297.  
  298.      1 = Lower Case
  299.      2 = Upper Case
  300.      1 + 2 = Numerals only
  301.      1 + 2 + 4 = Numerals and numeric punctuation ($,.%-+*/)
  302.      8 = use BIOS to display string (default is DVM)
  303.      32 = Return to BASIC if cursor is past end of string
  304.      64 = Return to BASIC if normal key pressed
  305.      128 = Return to BASIC if extended key (F1 - F10, etc.) is pressed.
  306.               NOTE: if this option is used and an extended key is pressed,
  307.               keycode% returned as 256 + the ASCII code of the extended
  308.               key.  This may be used along with StartEdit and LastEdit
  309.               to trap specified extended key presses.  See examples.
  310.      256 = Return to calling program if ALT key is pressed.  keycode%
  311.               is returned = 256.
  312.      -32768 = Use alternate reverse video cursor instead of the blinking
  313.               hardware cursor.  This option may cause "snow" on CGA monitors.
  314.               The cursor position is indicated by a black character on a
  315.               white background; in insert mode, either the character blinks
  316.               or the background is high intensity, depending on the last call
  317.               to SetBLINK (see VIDEO.DOC).  To preserve compatability with
  318.               future versions of LineEdit, do not use this option with
  319.               option 8.  This version of LineEdit ignores option -32768 if
  320.               option 8 is used.
  321.  
  322.     Use BASIC's OR operator to combine options.
  323.  
  324.     Example 1:
  325.          st$ = "This is the string to be edited              "
  326.                                   ' extra spaces allow for inserted characters
  327.          row% = 5: col% = 10
  328.          options% = 0             ' allow all characters, no fancy stuff
  329.          CALL LineEdit(st$, row%, col%, attr%, options%, keycode%)
  330.  
  331.     Example 2:
  332.          REM $INCLUDE: 'qlib.bi'
  333.          st$ = "This is the string to be edited": row% = 5: col% = 10
  334.          options% = 2 OR 128 ' All text input converted to upper case and
  335.                              ' return to calling program if extended key
  336.                              ' pressed.
  337.                              ' I want to trap F1, which returns the ASCII
  338.                              ' code a% = 59 (see your BASIC manual for
  339.                              ' extended key codes)
  340. 10       CALL LineEdit(st$, row%, col%, attr%, options%, keycode%)
  341.          IF keycode% AND 256 THEN
  342.               a% = keycode% AND 255
  343.               IF a% = 59 THEN ...      ' do F1 stuff
  344.                                        '    else go back to LineEdit:
  345.               CALL StartEdit(LastEdit) ' re-set cursor location
  346.               GOTO 10                  ' and go back to LineEdit
  347.          END IF
  348.  
  349.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  350.  
  351.     Function: keycode% = MaskEdit(mask$, row%, column%, attr%, options%)
  352.     object file: maskedit.obj (getkey.obj, qprint.obj, cursor.obj)
  353.  
  354.          Permits a string with fixed fields and fixed delimiters to be
  355.     edited.  This can be used, for example, to input telephone numbers
  356.     or ZIP codes, or other fixed-field data.  MaskEdit will permit only
  357.     the characters in the input string which are numbers, letters or
  358.     space characters to be edited, skipping over field delimiters.
  359.     MaskEdit will optionally limit input to numerals, or will force
  360.     lower-case input, or upper-case input.  MaskEdit returns to your
  361.     BASIC program when either ESC or ENTER is pressed.  MaskEdit options
  362.     are:
  363.  
  364.        1 = a-z forced to upper case 
  365.        2 = A-Z forced to lower case 
  366.        3 = numerals only allowed
  367.  
  368.     row% and column% are the location on the screen where you want
  369.     the string to be printed, and attr% is the color attribute to be used.
  370.     You may use the TAB key to jump from one field to the next, and
  371.     shift+TAB jumps the cursor back to the previous field.  You may also
  372.     use the left, right, home and end keys to move the cursor.
  373.  
  374.     Example:
  375.        REM $INCLUDE: 'qlib.bi'
  376.        REM  define the mask for entering telephone numbers
  377.        REM  I'm using CHR$(255) as a non-editable space character
  378.        mask$ = "(   )"+CHR$(255)+"   -    "
  379.        phone$ = mask$                 ' don't disturb mask$
  380.        options% = 3
  381.        keycode% = MaskEdit(phone$, row%, column%, attr%, options%)
  382.        IF keycode% = 27 THEN          ' ESC was pressed
  383.  
  384.  
  385.  
  386.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  387.  
  388.     Subroutine: MouseStatus(x%, y%, buttons%)
  389.     object file: mouse.obj
  390.  
  391.          Returns the mouse button status and mouse position.  Buttons% is
  392.     a code which indicates which mouse buttons, if any, are pressed, and
  393.     the PIXEL coordinates of the mouse cursor.  Pixel coordinates start
  394.     with (0,0) in the upper left corner.  X-coordinates are horizontal and 
  395.     Y-coordinates are vertical (increasing from top of screen to bottom).
  396.     Different screens have differing pixel counts in each character cell.
  397.     See KeyOrButton to decode buttons%.
  398.  
  399.     Example:
  400.          CALL MouseStatus(x%, y%, buttons%)
  401.  
  402.  
  403.  
  404.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  405.  
  406.     Subroutine: ShowMouse
  407.     object file: mouse.obj
  408.  
  409.          ShowMouse makes the mouse cursor visible.
  410.  
  411.     Example:
  412.          CALL ShowMouse
  413.  
  414.  
  415.  
  416.  
  417.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  418.  
  419.     Function: keycode% = VertList(VARPTR(a$(0)), row%, col%, choice%)
  420.     object files: vlist.obj (q$menu.obj, getkey.obj, crt.obj, q$qprn.obj,
  421.                              several others)
  422.  
  423.     Requires QuickBASIC or BC7 without /fs switch
  424.     NOT for QBX development enviornment
  425.  
  426.     Vertical list menu system; requires an array of varable-length strings,
  427.     upper left corner coordinates (row%, col%) and starting position
  428.     (choice%).  VertList returns to QuickBASIC when Esc, Enter or an
  429.     optional user-defined exit key is pressed, or when a mouse button is
  430.     pressed.  The keycode of the key pressed is returned as keycode% and
  431.     the menu selection is returned as choice%.  VertList uses all menu
  432.     options except option 6 (user-specified prompt string).  See MenuOption.
  433.  
  434.     Example:
  435.     REM $INCLUDE: 'qlib.bi'
  436.  
  437.     DIM mainmenu$(9)      ' 10 menu strings, 0-9; last string is NUL
  438.     FOR I= 0 TO 9
  439.       READ mainmenu$(I)   ' strings are in a DATA statement
  440.                           ' end of menu string data marked with a NUL string
  441.     NEXT I
  442.     row% = 5: col% = 10: choice% = 0
  443.                           ' "light bar" positioned at mainmenu$(0)
  444.     mm% = VARPTR(mainmenu$(0))
  445.     keycode% = VertList(mm%, row%, col%, choice%)
  446.  
  447.  
  448.  
  449.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  450.  
  451.     Subroutine: WindowEdit(st$, r0%, c0%, r1%, c1%, attr%, options%, keycode%)
  452.     Subroutine: WStartEdit(start%)
  453.     Function: WLastEdit
  454.     object files: wedit.obj (qprintw.obj(crt.obj, q$qprn.obj, q$clrw.obj),
  455.                              cursor.obj, getkey.obj)
  456.  
  457.          Similar to LineEdit, WindowEdit edits the string st$ in a window on
  458.     a text-mode screen and returns the result to BASIC.  WindowEdit is still
  459.     in the early stages of development; your comments and suggestions will
  460.     influence my development of this subroutine.
  461.  
  462.     WindowEdit differs from LineEdit in that it includes word wrap and
  463.     up/down cursor movement, and varies the length of the string st$, depending
  464.     on text inserted or deleted.  WindowEdit does not yet scroll to allow
  465.     editing strings longer than the window can display (but this is on my
  466.     list of enhancements).  WindowEdit also does not yet use any options%.
  467.     Note that you should use options% = 0 for compatability with future
  468.     versions of WindowEdit.  WStartEdit and WLastEdit are used with
  469.     WindowEdit as StartEdit and LastEdit are used with LineEdit.
  470.  
  471.     Summary of WindowEdit commands:
  472.  
  473.      Enter, Esc = return string to BASIC
  474.      Left, Right, Up, Down arrows = move cursor
  475.      Insert = toggle insert/overstrike modes
  476.      Home = move cursor to start of line
  477.      End = move cursor to end of line
  478.      Delete = delete character at cursor and close up space
  479.      Backspace = move cursor back one space, delete character, and close space
  480.      Ctrl+Left, Ctrl+Right = move cursor one word
  481.  
  482.  
  483.  
  484.  
  485.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  486.  
  487.     Function: YesNo
  488.     object file: yesno.obj
  489.  
  490.          Waits for either "Y" or "N" to be pressed, then returns the ASCII
  491.     character code of the key pressed.  The character code returned will be
  492.     the code for UPPER case "Y" or "N", regardless of whether the key pressed
  493.     was upper or lower case.
  494.  
  495.     Example:
  496.          REM $INCLUDE: 'QLIB.BI'
  497.          PRINT "Are you sure? (Y/N)"
  498.          REM  ASC("Y") = 89, ASC("N") = 78
  499.          IF YesNo = 89 THEN
  500.                    .         ' instructions for Y response
  501.                    .
  502.                    .
  503.               ELSE
  504.                    .         ' instructions for N response
  505.                    .
  506.                    .
  507.          END IF
  508.